import request from "@/utils/request";


// 获取所有交易记录
export function listTransactions(data) {
  return request({
    url: "/transaction/list",
    method: "get",
    params: data,
  });
}

// 获取微信名，交易类型，交易状态查询交易记录
export function searchTransactions(data) {
  return request({
    url: "/transaction/search",
    method: "get",
    params: data,
  });
}

// 充值请求
export function requestRecharge(data) {
  return request({
    url: "/transaction/recharge",
    method: "post",
    data,
  });
}

// 取现
export function requestWithdrawal(data) {
  return request({
    url: "/transaction/withdrawal",
    method: "post",
    data,
  });
}

// 审核：同意交易
export function confirmTransaction(data) {
  return request({
    url: "/transaction/confirm",
    method: "post",
    data,
  });
}

// 审核：拒绝交易
export function rejectTransaction(data) {
  return request({
    url: "/transaction/reject",
    method: "post",
    data,
  });
}
